/*
 * @Description:施工进度总计划接口
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2021-10-13 17:06:03
 * @LastEditTime: 2023-06-28 16:09:25
 * @FilePath: \cscec-pms-admin\src\api\construction\constructionSchedule.js
 */
import request from '@/utils/request2'
import request1 from '@/utils/request'
import { projectApiUrl } from '@/api/config'
const api = {
  queryScheduleMasterPlanTree: projectApiUrl + '/schedule/query-schedule-master-plan-tree',
  wbstemplate: projectApiUrl + '/construction/wbstemplate',
  masterPlanDetail: projectApiUrl + '/schedule/master-plan-detail',
  siblingWork: projectApiUrl + '/schedule/sibling-work',
  createChildWork: projectApiUrl + '/schedule/create-child-work',
  createChildWorkPack: projectApiUrl + '/schedule/create-child-work-pack',
  createSiblingWorkPack: projectApiUrl + '/schedule/create-sibling-work-pack',
  moveUp: projectApiUrl + '/schedule/move-up',
  moveDown: projectApiUrl + '/schedule/move-down',
  upgradeWorkPack: projectApiUrl + '/schedule/upgrade-work-pack',
  downgradeWorkPack: projectApiUrl + '/schedule/downgrade-work-pack',
  editWork: projectApiUrl + '/schedule/edit-work',
  editWorkPack: projectApiUrl + '/schedule/edit-work-pack',
  removeWork: projectApiUrl + '/schedule/remove-work',
  removeWorkPack: projectApiUrl + '/schedule/remove-work-pack',
  queryFrontTaskTree: projectApiUrl + '/schedule/query-front-task-tree',
  queryFrontTask: projectApiUrl + '/schedule/query-front-task',
  createFrontTask: projectApiUrl + '/schedule/create-front-task',
  editFrontTask: projectApiUrl + '/schedule/edit-front-task',
  deleteFrontTask: projectApiUrl + '/schedule/delete-front-task',
  directlyDutyPersonSelectQuery: projectApiUrl + '/schedule/directly-duty-person-select-query',
  nodeList: projectApiUrl + '/schedule/node-list',
  masterPlanSubmitApproval: projectApiUrl + '/schedule/master-plan-submit-approval',
  doubleNetworkPictureUpload: projectApiUrl + '/schedule/double-network-picture-upload',
  importTemplate: projectApiUrl + '/schedule/import-template',
  implementationKanbanShow: projectApiUrl + '/schedule/implementation-kanban-show',
  implementationKanbanHidden: projectApiUrl + '/schedule/implementation-kanban-hidden',
  masterPlanCalendar: projectApiUrl + '/schedule/master-plan-calendar',
  masterPlanHistoryAdjust: projectApiUrl + '/schedule/master-plan-history-adjust',
  workWithResult: projectApiUrl + '/schedule/work-with-result',
  nodeMaintain: projectApiUrl + '/schedule/node-maintain',
  nodeStartMaintain: projectApiUrl + '/schedule/node-start-maintain',
  labelTreeList: projectApiUrl + '/plan-label/labelTreeList',
  onTimeCompleteRateDetail: projectApiUrl + '/schedule/on-time-complete-rate-detail',
  completeRateDetail: projectApiUrl + '/schedule/complete-rate-detail',
  nodeMaintainFile: projectApiUrl + '/schedule/node-maintain-file',
  masterPlanDetailPlan: projectApiUrl + '/schedule/master-plan-detail/plan',
  doubleNetworkPictureQueryPlan: projectApiUrl + '/schedule/double-network-picture-query/plan',
  doubleNetworkPictureQuery: projectApiUrl + '/schedule/double-network-picture-query',
  scheduleWeekPlanList: projectApiUrl + '/schedule-week/list',
  scheduleWeekPlanCount: projectApiUrl + '/schedule-week/count',
  scheduleMonthPlanList: projectApiUrl + '/schedule-month/list',
  scheduleMonthPlanCount: projectApiUrl + '/schedule-month/count',
  weekPlanDetail: projectApiUrl + '/schedule-week/week-plan-detail',
  monthPlanDetail: projectApiUrl + '/schedule-month/month-plan-detail',
  scheduleWeekEditWork: projectApiUrl + '/schedule-week/edit-work',
  scheduleMonthEditWork: projectApiUrl + '/schedule-month/edit-work',
  weekPlanSubmitApproval: projectApiUrl + '/schedule-week/week-plan-submit-approval',
  monthPlanSubmitApproval: projectApiUrl + '/schedule-month/month-plan-submit-approval',
  scheduleWeekSiblingWork: projectApiUrl + '/schedule-week/sibling-work',
  scheduleMonthSiblingWork: projectApiUrl + '/schedule-month/sibling-work',
  scheduleWeekRemoveWork: projectApiUrl + '/schedule-week/remove-work',
  scheduleMonthRemoveWork: projectApiUrl + '/schedule-month/remove-work',
  masterPlanExportExcl: projectApiUrl + '/schedule/master-plan-export-excl',
  masterPlanExportProject: projectApiUrl + '/schedule/master-plan-export-project',
  masterPlanDetailSearch : projectApiUrl + '/schedule/master-plan-detail-search',
  monthPlanList : projectApiUrl + '/schedule-month/month-plan-list',
  weekPlanList: projectApiUrl + '/schedule-week/week-plan-list',
  importProject: projectApiUrl + '/schedule/import-project',
  masterPlanExportList: projectApiUrl + '/schedule/master-plan-export-list',
  queryHistoryAdjustDetail : projectApiUrl + '/schedule/query-history-adjust-detail',
}
export default {
  /**
    * @description: 获取施工进度总计划列表
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  queryScheduleMasterPlanTree: data => {
    return request({
      url: api.queryScheduleMasterPlanTree,
      method: 'post',
      data
    })
  },
  /**
    * @description: 获取项目业态
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  wbstemplate: data => {
    return request({
      url: api.wbstemplate,
      method: 'get',
      params: data
    })
  },
  /**
    * @description: 获取施工进度总计划详情
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  masterPlanDetail: data => {
    return request({
      url: `${api.masterPlanDetail}/${data}`,
      method: 'get'
    })
  },
  /**
    * @description: 获取施工进度总计划详情搜索
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  masterPlanDetailSearch: data => {
    return request({
      url: `${api.masterPlanDetailSearch}`,
      method: 'post',
      data
    })
  },
  /**
    * @description: 新增同级业务事项
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  siblingWork: data => {
    return request({
      url: api.siblingWork,
      method: 'post',
      data
    })
  },
  /**
    * @description: 新增下级业务事项
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  createChildWork: data => {
    return request({
      url: api.createChildWork,
      method: 'post',
      data
    })
  },
  /**
    * @description: 新增下级阶段/类别
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  createChildWorkPack: data => {
    return request({
      url: api.createChildWorkPack,
      method: 'post',
      data
    })
  },
  /**
    * @description: 新增同级阶段/类别
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  createSiblingWorkPack: data => {
    return request({
      url: api.createSiblingWorkPack,
      method: 'post',
      data
    })
  },
  /**
    * @description: 上移
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  moveUp: data => {
    return request({
      url: api.moveUp,
      method: 'post',
      data
    })
  },
  /**
    * @description: 下移
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  moveDown: data => {
    return request({
      url: api.moveDown,
      method: 'post',
      data
    })
  },
  /**
    * @description: 升级
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  upgradeWorkPack: data => {
    return request({
      url: api.upgradeWorkPack,
      method: 'post',
      data
    })
  },
  /**
    * @description: 降级
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  downgradeWorkPack: data => {
    return request({
      url: api.downgradeWorkPack,
      method: 'post',
      data
    })
  },
  /**
    * @description: 编辑业务事项
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  editWork: data => {
    return request({
      url: api.editWork,
      method: 'post',
      data
    })
  },
  /**
    * @description: 编辑阶段/类别
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  editWorkPack: data => {
    return request({
      url: api.editWorkPack,
      method: 'post',
      data
    })
  },
  /**
    * @description: 删除阶段/类别
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  removeWorkPack: data => {
    return request({
      url: api.removeWorkPack,
      method: 'post',
      data
    })
  },
  /**
    * @description: 删除业务事项
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  removeWork: data => {
    return request({
      url: api.removeWork,
      method: 'post',
      data
    })
  },
  /**
    * @description: 获取前置任务节点名称树
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  queryFrontTaskTree: data => {
    return request({
      url: api.queryFrontTaskTree,
      method: 'post',
      data
    })
  },
  /**
    * @description: 获取前置任务列表
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  queryFrontTask: data => {
    return request({
      url: `${api.queryFrontTask}/${data}`,
      method: 'get'
    })
  },
  /**
    * @description: 新增前置任务
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  createFrontTask: data => {
    return request({
      url: api.createFrontTask,
      method: 'post',
      data
    })
  },
  /**
    * @description: 编辑前置任务
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  editFrontTask: data => {
    return request({
      url: api.editFrontTask,
      method: 'post',
      data
    })
  },
  /**
    * @description: 删除前置任务
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  deleteFrontTask: data => {
    return request({
      url: api.deleteFrontTask,
      method: 'post',
      data
    })
  },
  /**
    * @description: 获取直接责任人
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  directlyDutyPersonSelectQuery: data => {
    return request({
      url: api.directlyDutyPersonSelectQuery,
      method: 'post',
      data
    })
  },
  /**
    * @description: 获取点信息列表
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  nodeList: data => {
    return request({
      url: api.nodeList,
      method: 'post',
      data
    })
  },
  /**
    * @description: 施工总计划提交审批
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  masterPlanSubmitApproval: data => {
    return request({
      url: api.masterPlanSubmitApproval,
      method: 'post',
      data
    })
  },
  /**
    * @description: 双代号网络图附件上传
    * @param {Object} data 接口参数
    * @return {Promise} 接口Promise
    */
  doubleNetworkPictureUpload: data => {
    return request({
      url: api.doubleNetworkPictureUpload,
      method: 'post',
      data
    })
  },
  /**
   * @description: 导入模板
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  importTemplate: data => {
    return request({
      url: api.importTemplate,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取施工进度总计划看板显示数据
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  implementationKanbanShow: data => {
    return request({
      url: `${api.implementationKanbanShow}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取施工进度总计划看板隐藏数据
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  implementationKanbanHidden: data => {
    return request({
      url: `${api.implementationKanbanHidden}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取施工进度总计划日历数据
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  masterPlanCalendar: data => {
    return request({
      url: api.masterPlanCalendar,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取施工进度总计划历史调整记录
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  masterPlanHistoryAdjust: data => {
    return request({
      url: `${api.masterPlanHistoryAdjust}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取工作详情和节点维护信息
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  workWithResult: data => {
    return request({
      url: `${api.workWithResult}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 节点完成(节点维护修改而来)
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  nodeMaintain: data => {
    return request({
      url: api.nodeMaintain,
      method: 'post',
      data
    })
  },
  /**
   * @description: 节点开始
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  nodeStartMaintain: data => {
    return request({
      url: api.nodeStartMaintain,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取逾期类型树
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  labelTreeList: data => {
    return request({
      url: api.labelTreeList,
      method: 'get',
      params: data
    })
  },
  /**
   * @description: 获取节点按时完成率
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  onTimeCompleteRateDetail: data => {
    return request({
      url: `${api.onTimeCompleteRateDetail}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取节点完成率
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  completeRateDetail: data => {
    return request({
      url: `${api.completeRateDetail}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取节点完成率
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  nodeMaintainFile: data => {
    return request({
      url: api.nodeMaintainFile,
      method: 'post',
      data
    })
  },
  /**
   * @description: 审批获取施工进度总计划列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  masterPlanDetailPlan: data => {
    return request({
      url: `${api.masterPlanDetailPlan}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 审批获取双代号网络图
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  doubleNetworkPictureQueryPlan: data => {
    return request({
      url: `${api.doubleNetworkPictureQueryPlan}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 获取双代号网络图
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  doubleNetworkPictureQuery: data => {
    return request({
      url: `${api.doubleNetworkPictureQuery}/${data}`,
      method: 'get'
    })
  },
  /**
   * @description: 导入project
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  importProject: data => {
    return request({
      url: api.importProject,
      method: 'post',
      data
    })
  },
  /**
   * @description: 列表导出全部
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  masterPlanExportList: (data) => {
    return request1({
      url: api.masterPlanExportList,
      method: 'post',
      responseType: 'blob',
      data
    })
  },
  /**
   * @description: 历史调整信息列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  queryHistoryAdjustDetail: data => {
    return request({
      url: api.queryHistoryAdjustDetail,
      method: 'post',
      data
    })
  }
}
const plan = {
  /**
   * @description: 获取周计划列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  scheduleWeekPlanList: data => {
    return request({
      url: api.scheduleWeekPlanList,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取周计划统计
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  scheduleWeekPlanCount: data => {
    return request({
      url: api.scheduleWeekPlanCount,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取周计划详情
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  weekPlanDetail: data => {
    return request({
      url: `${api.weekPlanDetail}/${data}`,
      method: 'get',
    })
  },
  /**
   * @description: 获取月计划列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  scheduleMonthPlanList: data => {
    return request({
      url: api.scheduleMonthPlanList,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取月计划统计
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  scheduleMonthPlanCount: data => {
    return request({
      url: api.scheduleMonthPlanCount,
      method: 'post',
      data
    })
  },
  /**
   * @description: 获取月计划详情
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  monthPlanDetail: data => {
    return request({
      url: `${api.monthPlanDetail}/${data}`,
      method: 'get',
    })
  },
  /**
   * @description: 编辑周计划
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  scheduleWeekEditWork: data => {
    return request({
      url: api.scheduleWeekEditWork,
      method: 'post',
      data
    })
  },
  /**
   * @description: 编辑月计划
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  scheduleMonthEditWork: data => {
    return request({
      url: api.scheduleMonthEditWork,
      method: 'post',
      data
    })
  },
  /**
   * @description: 周计划提交审批
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  weekPlanSubmitApproval: data => {
    return request({
      url: api.weekPlanSubmitApproval,
      method: 'post',
      data
    })
  },
  /**
   * @description: 月计划提交审批
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  monthPlanSubmitApproval: data => {
    return request({
      url: api.monthPlanSubmitApproval,
      method: 'post',
      data
    })
  },
  /**
   * @description: 周计划新增同级节点
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  scheduleWeekSiblingWork: data => {
    return request({
      url: api.scheduleWeekSiblingWork,
      method: 'post',
      data
    })
  },
  /**
   * @description: 月计划新增同级节点
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  scheduleMonthSiblingWork: data => {
    return request({
      url: api.scheduleMonthSiblingWork,
      method: 'post',
      data
    })
  },
  /**
   * @description: 周计划删除业务事项
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  scheduleWeekRemoveWork: data => {
    return request({
      url: api.scheduleWeekRemoveWork,
      method: 'post',
      data
    })
  },
  /**
   * @description: 月计划删除业务事项
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  scheduleMonthRemoveWork: data => {
    return request({
      url: api.scheduleMonthRemoveWork,
      method: 'post',
      data
    })
  },
  /**
   * @description: 施工进度总计划导出excel
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  masterPlanExportExcl: data => {
    return request1({
      url: `${api.masterPlanExportExcl}/${data}`,
      method: 'get',
      responseType: 'blob'
    })
  },
  /**
   * @description: 施工进度总计划导出project
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  masterPlanExportProject: data => {
    return request1({
      url: `${api.masterPlanExportProject}/${data}`,
      method: 'get',
      responseType: 'blob'
    })
  },
  /**
   * @description: 月计划列表统计筛选列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  monthPlanList: data => {
    return request({
      url: api.monthPlanList,
      method: 'post',
      data
    })
  },
  /**
   * @description: 周计划列表统计筛选列表
   * @param {Object} data 接口参数
   * @return {Promise} 接口Promise
   */
  weekPlanList: data => {
    return request({
      url: api.weekPlanList,
      method: 'post',
      data
    })
  }
}
export {
  plan
}